package cglib;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

/**
 * @author MaoLin Wang
 * @description
 * @date 2020/9/9 5:00 下午
 */
public class CgLigInterceptor implements MethodInterceptor {
    public Object intercept(Object o, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
        Dog dog=(Dog)o;
        dog.setName("11");
        Object o1 = methodProxy.invokeSuper(o, args);
        return o1;
    }
}
